<!--
  @author heguanghua
  @since 2020/05/10 18:18
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid"
     th:with="hasEditWhitelist=${#authPermit.checkPermit('/staff/modify/setWhitelist.action')}">

    <div class="layui-card">

        <div class="layui-card-body">

            <blockquote class="layui-elem-quote layui-quote-nm">
                1、加入白名单后，登录时忽略IP认证的限制；<br/>
                2、白名单用户永久忽略IP限制，请慎重开通，不需要时及时关闭。
            </blockquote>

            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="staffId" th:value="${obj.staffId}"/>

                <div class="layui-form-item layui-margin-t">
                    <label class="layui-form-label" style="width:100px;">加入白名单：</label>
                    <div class="layui-input-inline" style="width:200px">
                        <input type="radio" name="whitelist" th:value="${item.key}" th:checked="${item.key == obj.whitelist}" th:title="${item.value}" th:each="item:${yesno}">
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block" th:if="${hasEditWhitelist}">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>

            </form>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    var json = {
        staffId: [[${obj.staffId}]]
    };

    layui.extend({
        staff_detail_whitelist: "staff/zmn.staff.detail.whitelist",
    }).use(['index', 'staff_detail_whitelist']);

</script>
